const fs = require('fs');
const p = new Promise(function (resolve, reject) {
    fs.readFile("./resources/为学.md", (err, data) => {
        // 如果出错
        if (err) reject(err);
        // 如果成功
        resolve(data);
    });
});

p.then(value => {
    console.log(value.toString());
}, reason => {
    console.log("读取失败!!");
});
